package easytasks.logic;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class TaskNotificationBootReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent)
	{
		if (context == null) throw new IllegalArgumentException("'context' must be not null.");
		
		TaskNotificationManager manager = new TaskNotificationManager(context);
		
		// Update notification alarm
		manager.updateNotificationAlarm();
		
		// Show notification
		if (manager.getSettingsNotificationsEnabled()) manager.showNotification();
	}
}
